<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-pragma">{-# LANGUAGE RankNTypes #-}</span><span>
</span><span id="line-2"></span><span class="hs-pragma">{-# LANGUAGE CPP #-}</span><span>
</span><span id="line-3"></span><span>
</span><span id="line-4"></span><span class="hs-comment">-- | Definitions for writing /plugins/ for GHC. Plugins can hook into</span><span>
</span><span id="line-5"></span><span class="hs-comment">-- several areas of the compiler. See the 'Plugin' type. These plugins</span><span>
</span><span id="line-6"></span><span class="hs-comment">-- include type-checker plugins, source plugins, and core-to-core plugins.</span><span>
</span><span id="line-7"></span><span>
</span><span id="line-8"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">GHC.Driver.Plugins</span><span> </span><span class="hs-special">(</span><span>
</span><span id="line-9"></span><span>      </span><span class="annot"><span class="hs-comment">-- * Plugins</span></span><span>
</span><span id="line-10"></span><span>      </span><span class="annot"><a href="GHC.Driver.Plugins.html#Plugin"><span class="hs-identifier">Plugin</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span>
</span><span id="line-11"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Driver.Plugins.html#defaultPlugin"><span class="hs-identifier">defaultPlugin</span></a></span><span>
</span><span id="line-12"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Driver.Plugins.html#CommandLineOption"><span class="hs-identifier">CommandLineOption</span></a></span><span>
</span><span id="line-13"></span><span>      </span><span class="annot"><span class="hs-comment">-- ** Recompilation checking</span></span><span>
</span><span id="line-14"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Driver.Plugins.html#purePlugin"><span class="hs-identifier">purePlugin</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Driver.Plugins.html#impurePlugin"><span class="hs-identifier">impurePlugin</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Driver.Plugins.html#flagRecompile"><span class="hs-identifier">flagRecompile</span></a></span><span>
</span><span id="line-15"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Driver.Plugins.html#PluginRecompile"><span class="hs-identifier">PluginRecompile</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span>
</span><span id="line-16"></span><span>
</span><span id="line-17"></span><span>      </span><span class="annot"><span class="hs-comment">-- * Plugin types</span></span><span>
</span><span id="line-18"></span><span>      </span><span class="annot"><span class="hs-comment">-- ** Frontend plugins</span></span><span>
</span><span id="line-19"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Driver.Plugins.html#FrontendPlugin"><span class="hs-identifier">FrontendPlugin</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Driver.Plugins.html#defaultFrontendPlugin"><span class="hs-identifier">defaultFrontendPlugin</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Driver.Plugins.html#FrontendPluginAction"><span class="hs-identifier">FrontendPluginAction</span></a></span><span>
</span><span id="line-20"></span><span>      </span><span class="annot"><span class="hs-comment">-- ** Core plugins</span></span><span>
</span><span id="line-21"></span><span>      </span><span class="annot"><span class="hs-comment">-- | Core plugins allow plugins to register as a Core-to-Core pass.</span></span><span>
</span><span id="line-22"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Driver.Plugins.html#CorePlugin"><span class="hs-identifier">CorePlugin</span></a></span><span>
</span><span id="line-23"></span><span>      </span><span class="annot"><span class="hs-comment">-- ** Typechecker plugins</span></span><span>
</span><span id="line-24"></span><span>      </span><span class="hs-comment">-- | Typechecker plugins allow plugins to provide evidence to the</span><span>
</span><span id="line-25"></span><span>      </span><span class="hs-comment">-- typechecker.</span><span>
</span><span id="line-26"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Driver.Plugins.html#TcPlugin"><span class="hs-identifier">TcPlugin</span></a></span><span>
</span><span id="line-27"></span><span>      </span><span class="annot"><span class="hs-comment">-- ** Source plugins</span></span><span>
</span><span id="line-28"></span><span>      </span><span class="hs-comment">-- | GHC offers a number of points where plugins can access and modify its</span><span>
</span><span id="line-29"></span><span>      </span><span class="hs-comment">-- front-end (\&quot;source\&quot;) representation. These include:</span><span>
</span><span id="line-30"></span><span>      </span><span class="hs-comment">--</span><span>
</span><span id="line-31"></span><span>      </span><span class="hs-comment">-- - access to the parser result with 'parsedResultAction'</span><span>
</span><span id="line-32"></span><span>      </span><span class="hs-comment">-- - access to the renamed AST with 'renamedResultAction'</span><span>
</span><span id="line-33"></span><span>      </span><span class="hs-comment">-- - access to the typechecked AST with 'typeCheckResultAction'</span><span>
</span><span id="line-34"></span><span>      </span><span class="hs-comment">-- - access to the Template Haskell splices with 'spliceRunAction'</span><span>
</span><span id="line-35"></span><span>      </span><span class="hs-comment">-- - access to loaded interface files with 'interfaceLoadAction'</span><span>
</span><span id="line-36"></span><span>      </span><span class="hs-comment">--</span><span>
</span><span id="line-37"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Driver.Plugins.html#keepRenamedSource"><span class="hs-identifier">keepRenamedSource</span></a></span><span>
</span><span id="line-38"></span><span>      </span><span class="annot"><span class="hs-comment">-- ** Hole fit plugins</span></span><span>
</span><span id="line-39"></span><span>      </span><span class="hs-comment">-- | hole fit plugins allow plugins to change the behavior of valid hole</span><span>
</span><span id="line-40"></span><span>      </span><span class="hs-comment">-- fit suggestions</span><span>
</span><span id="line-41"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Tc.Errors.Hole.FitTypes.html#HoleFitPluginR"><span class="hs-identifier">HoleFitPluginR</span></a></span><span>
</span><span id="line-42"></span><span>
</span><span id="line-43"></span><span>      </span><span class="annot"><span class="hs-comment">-- * Internal</span></span><span>
</span><span id="line-44"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Driver.Plugins.html#PluginWithArgs"><span class="hs-identifier">PluginWithArgs</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Driver.Plugins.html#plugins"><span class="hs-identifier">plugins</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Driver.Plugins.html#pluginRecompile%27"><span class="hs-identifier">pluginRecompile'</span></a></span><span>
</span><span id="line-45"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Driver.Plugins.html#LoadedPlugin"><span class="hs-identifier">LoadedPlugin</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Driver.Plugins.html#lpModuleName"><span class="hs-identifier">lpModuleName</span></a></span><span>
</span><span id="line-46"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Driver.Plugins.html#StaticPlugin"><span class="hs-identifier">StaticPlugin</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span>
</span><span id="line-47"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Driver.Plugins.html#mapPlugins"><span class="hs-identifier">mapPlugins</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Driver.Plugins.html#withPlugins"><span class="hs-identifier">withPlugins</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Driver.Plugins.html#withPlugins_"><span class="hs-identifier">withPlugins_</span></a></span><span>
</span><span id="line-48"></span><span>    </span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-49"></span><span>
</span><span id="line-50"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Prelude.html"><span class="hs-identifier">GHC.Prelude</span></a></span><span>
</span><span id="line-51"></span><span>
</span><span id="line-52"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html"><span class="hs-identifier">GHC.Core.Opt.Monad</span></a></span><span> </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#CoreToDo"><span class="hs-identifier">CoreToDo</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#CoreM"><span class="hs-identifier">CoreM</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-53"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html"><span class="hs-identifier">GHC.Tc.Types</span></a></span><span>
</span><span id="line-54"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html"><span class="hs-identifier">GHC.Tc.Types</span></a></span><span> </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#TcGblEnv"><span class="hs-identifier">TcGblEnv</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#IfM"><span class="hs-identifier">IfM</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#TcM"><span class="hs-identifier">TcM</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#tcg_rn_decls"><span class="hs-identifier">tcg_rn_decls</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#tcg_rn_exports"><span class="hs-identifier">tcg_rn_exports</span></a></span><span>  </span><span class="hs-special">)</span><span>
</span><span id="line-55"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Tc.Errors.Hole.FitTypes.html"><span class="hs-identifier">GHC.Tc.Errors.Hole.FitTypes</span></a></span><span> </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Tc.Errors.Hole.FitTypes.html#HoleFitPluginR"><span class="hs-identifier">HoleFitPluginR</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-56"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Hs.html"><span class="hs-identifier">GHC.Hs</span></a></span><span>
</span><span id="line-57"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html"><span class="hs-identifier">GHC.Driver.Session</span></a></span><span>
</span><span id="line-58"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Driver.Types.html"><span class="hs-identifier">GHC.Driver.Types</span></a></span><span>
</span><span id="line-59"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Driver.Monad.html"><span class="hs-identifier">GHC.Driver.Monad</span></a></span><span>
</span><span id="line-60"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Driver.Phases.html"><span class="hs-identifier">GHC.Driver.Phases</span></a></span><span>
</span><span id="line-61"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Unit.Module.html"><span class="hs-identifier">GHC.Unit.Module</span></a></span><span>
</span><span id="line-62"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Fingerprint.html"><span class="hs-identifier">GHC.Utils.Fingerprint</span></a></span><span>
</span><span id="line-63"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.List.html#"><span class="hs-identifier">Data.List</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Data.OldList.html#sort"><span class="hs-identifier">sort</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-64"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html"><span class="hs-identifier">GHC.Utils.Outputable</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Outputable.html#Outputable"><span class="hs-identifier">Outputable</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier">text</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator">(&lt;+&gt;)</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-65"></span><span>
</span><span id="line-66"></span><span class="hs-comment">--Qualified import so we can define a Semigroup instance</span><span>
</span><span id="line-67"></span><span class="hs-comment">-- but it doesn't clash with Outputable.&lt;&gt;</span><span>
</span><span id="line-68"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="../../base/src/Data.Semigroup.html#"><span class="hs-identifier">Data.Semigroup</span></a></span><span>
</span><span id="line-69"></span><span>
</span><span id="line-70"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Control.Monad.html#"><span class="hs-identifier">Control.Monad</span></a></span><span>
</span><span id="line-71"></span><span>
</span><span id="line-72"></span><span class="hs-comment">-- | Command line options gathered from the -PModule.Name:stuff syntax</span><span>
</span><span id="line-73"></span><span class="hs-comment">-- are given to you as this type</span><span>
</span><span id="line-74"></span><span class="hs-keyword">type</span><span> </span><span id="CommandLineOption"><span class="annot"><a href="GHC.Driver.Plugins.html#CommandLineOption"><span class="hs-identifier hs-var">CommandLineOption</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-75"></span><span>
</span><span id="line-76"></span><span class="hs-comment">-- | 'Plugin' is the compiler plugin data type. Try to avoid</span><span>
</span><span id="line-77"></span><span class="hs-comment">-- constructing one of these directly, and just modify some fields of</span><span>
</span><span id="line-78"></span><span class="hs-comment">-- 'defaultPlugin' instead: this is to try and preserve source-code</span><span>
</span><span id="line-79"></span><span class="hs-comment">-- compatibility when we add fields to this.</span><span>
</span><span id="line-80"></span><span class="hs-comment">--</span><span>
</span><span id="line-81"></span><span class="hs-comment">-- Nonetheless, this API is preliminary and highly likely to change in</span><span>
</span><span id="line-82"></span><span class="hs-comment">-- the future.</span><span>
</span><span id="line-83"></span><span class="hs-keyword">data</span><span> </span><span id="Plugin"><span class="annot"><a href="GHC.Driver.Plugins.html#Plugin"><span class="hs-identifier hs-var">Plugin</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="Plugin"><span class="annot"><a href="GHC.Driver.Plugins.html#Plugin"><span class="hs-identifier hs-var">Plugin</span></a></span></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-84"></span><span>    </span><span id="installCoreToDos"><span class="annot"><span class="annottext">Plugin -&gt; CorePlugin
</span><a href="GHC.Driver.Plugins.html#installCoreToDos"><span class="hs-identifier hs-var hs-var">installCoreToDos</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Plugins.html#CorePlugin"><span class="hs-identifier hs-type">CorePlugin</span></a></span><span>
</span><span id="line-85"></span><span>    </span><span class="hs-comment">-- ^ Modify the Core pipeline that will be used for compilation.</span><span>
</span><span id="line-86"></span><span>    </span><span class="hs-comment">-- This is called as the Core pipeline is built for every module</span><span>
</span><span id="line-87"></span><span>    </span><span class="hs-comment">-- being compiled, and plugins get the opportunity to modify the</span><span>
</span><span id="line-88"></span><span>    </span><span class="hs-comment">-- pipeline in a nondeterministic order.</span><span>
</span><span id="line-89"></span><span>  </span><span class="hs-special">,</span><span> </span><span id="tcPlugin"><span class="annot"><span class="annottext">Plugin -&gt; TcPlugin
</span><a href="GHC.Driver.Plugins.html#tcPlugin"><span class="hs-identifier hs-var hs-var">tcPlugin</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Plugins.html#TcPlugin"><span class="hs-identifier hs-type">TcPlugin</span></a></span><span>
</span><span id="line-90"></span><span>    </span><span class="hs-comment">-- ^ An optional typechecker plugin, which may modify the</span><span>
</span><span id="line-91"></span><span>    </span><span class="hs-comment">-- behaviour of the constraint solver.</span><span>
</span><span id="line-92"></span><span>  </span><span class="hs-special">,</span><span> </span><span id="holeFitPlugin"><span class="annot"><span class="annottext">Plugin -&gt; HoleFitPlugin
</span><a href="GHC.Driver.Plugins.html#holeFitPlugin"><span class="hs-identifier hs-var hs-var">holeFitPlugin</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Plugins.html#HoleFitPlugin"><span class="hs-identifier hs-type">HoleFitPlugin</span></a></span><span>
</span><span id="line-93"></span><span>    </span><span class="hs-comment">-- ^ An optional plugin to handle hole fits, which may re-order</span><span>
</span><span id="line-94"></span><span>    </span><span class="hs-comment">--   or change the list of valid hole fits and refinement hole fits.</span><span>
</span><span id="line-95"></span><span>  </span><span class="hs-special">,</span><span> </span><span id="dynflagsPlugin"><span class="annot"><span class="annottext">Plugin -&gt; [String] -&gt; DynFlags -&gt; IO DynFlags
</span><a href="GHC.Driver.Plugins.html#dynflagsPlugin"><span class="hs-identifier hs-var hs-var">dynflagsPlugin</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Driver.Plugins.html#CommandLineOption"><span class="hs-identifier hs-type">CommandLineOption</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#DynFlags"><span class="hs-identifier hs-type">DynFlags</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#DynFlags"><span class="hs-identifier hs-type">DynFlags</span></a></span><span>
</span><span id="line-96"></span><span>    </span><span class="hs-comment">-- ^ An optional plugin to update 'DynFlags', right after</span><span>
</span><span id="line-97"></span><span>    </span><span class="hs-comment">--   plugin loading. This can be used to register hooks</span><span>
</span><span id="line-98"></span><span>    </span><span class="hs-comment">--   or tweak any field of 'DynFlags' before doing</span><span>
</span><span id="line-99"></span><span>    </span><span class="hs-comment">--   actual work on a module.</span><span>
</span><span id="line-100"></span><span>    </span><span class="hs-comment">--</span><span>
</span><span id="line-101"></span><span>    </span><span class="hs-comment">--   @since 8.10.1</span><span>
</span><span id="line-102"></span><span>  </span><span class="hs-special">,</span><span> </span><span id="pluginRecompile"><span class="annot"><span class="annottext">Plugin -&gt; [String] -&gt; IO PluginRecompile
</span><a href="GHC.Driver.Plugins.html#pluginRecompile"><span class="hs-identifier hs-var hs-var">pluginRecompile</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Driver.Plugins.html#CommandLineOption"><span class="hs-identifier hs-type">CommandLineOption</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="GHC.Driver.Plugins.html#PluginRecompile"><span class="hs-identifier hs-type">PluginRecompile</span></a></span><span>
</span><span id="line-103"></span><span>    </span><span class="hs-comment">-- ^ Specify how the plugin should affect recompilation.</span><span>
</span><span id="line-104"></span><span>  </span><span class="hs-special">,</span><span> </span><span id="parsedResultAction"><span class="annot"><span class="annottext">Plugin
-&gt; [String] -&gt; ModSummary -&gt; HsParsedModule -&gt; Hsc HsParsedModule
</span><a href="GHC.Driver.Plugins.html#parsedResultAction"><span class="hs-identifier hs-var hs-var">parsedResultAction</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Driver.Plugins.html#CommandLineOption"><span class="hs-identifier hs-type">CommandLineOption</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#ModSummary"><span class="hs-identifier hs-type">ModSummary</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#HsParsedModule"><span class="hs-identifier hs-type">HsParsedModule</span></a></span><span>
</span><span id="line-105"></span><span>                            </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#Hsc"><span class="hs-identifier hs-type">Hsc</span></a></span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#HsParsedModule"><span class="hs-identifier hs-type">HsParsedModule</span></a></span><span>
</span><span id="line-106"></span><span>    </span><span class="hs-comment">-- ^ Modify the module when it is parsed. This is called by</span><span>
</span><span id="line-107"></span><span>    </span><span class="hs-comment">-- &quot;GHC.Driver.Main&quot; when the parsing is successful.</span><span>
</span><span id="line-108"></span><span>  </span><span class="hs-special">,</span><span> </span><span id="renamedResultAction"><span class="annot"><span class="annottext">Plugin
-&gt; [String]
-&gt; TcGblEnv
-&gt; HsGroup GhcRn
-&gt; TcM (TcGblEnv, HsGroup GhcRn)
</span><a href="GHC.Driver.Plugins.html#renamedResultAction"><span class="hs-identifier hs-var hs-var">renamedResultAction</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Driver.Plugins.html#CommandLineOption"><span class="hs-identifier hs-type">CommandLineOption</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#TcGblEnv"><span class="hs-identifier hs-type">TcGblEnv</span></a></span><span>
</span><span id="line-109"></span><span>                                </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Hs.Decls.html#HsGroup"><span class="hs-identifier hs-type">HsGroup</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#TcM"><span class="hs-identifier hs-type">TcM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Tc.Types.html#TcGblEnv"><span class="hs-identifier hs-type">TcGblEnv</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Hs.Decls.html#HsGroup"><span class="hs-identifier hs-type">HsGroup</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-110"></span><span>    </span><span class="hs-comment">-- ^ Modify each group after it is renamed. This is called after each</span><span>
</span><span id="line-111"></span><span>    </span><span class="hs-comment">-- `HsGroup` has been renamed.</span><span>
</span><span id="line-112"></span><span>  </span><span class="hs-special">,</span><span> </span><span id="typeCheckResultAction"><span class="annot"><span class="annottext">Plugin -&gt; [String] -&gt; ModSummary -&gt; TcGblEnv -&gt; TcM TcGblEnv
</span><a href="GHC.Driver.Plugins.html#typeCheckResultAction"><span class="hs-identifier hs-var hs-var">typeCheckResultAction</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Driver.Plugins.html#CommandLineOption"><span class="hs-identifier hs-type">CommandLineOption</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#ModSummary"><span class="hs-identifier hs-type">ModSummary</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#TcGblEnv"><span class="hs-identifier hs-type">TcGblEnv</span></a></span><span>
</span><span id="line-113"></span><span>                               </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#TcM"><span class="hs-identifier hs-type">TcM</span></a></span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#TcGblEnv"><span class="hs-identifier hs-type">TcGblEnv</span></a></span><span>
</span><span id="line-114"></span><span>    </span><span class="hs-comment">-- ^ Modify the module when it is type checked. This is called at the</span><span>
</span><span id="line-115"></span><span>    </span><span class="hs-comment">-- very end of typechecking.</span><span>
</span><span id="line-116"></span><span>  </span><span class="hs-special">,</span><span> </span><span id="spliceRunAction"><span class="annot"><span class="annottext">Plugin -&gt; [String] -&gt; LHsExpr GhcTc -&gt; TcM (LHsExpr GhcTc)
</span><a href="GHC.Driver.Plugins.html#spliceRunAction"><span class="hs-identifier hs-var hs-var">spliceRunAction</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Driver.Plugins.html#CommandLineOption"><span class="hs-identifier hs-type">CommandLineOption</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Hs.Expr.html#LHsExpr"><span class="hs-identifier hs-type">LHsExpr</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcTc"><span class="hs-identifier hs-type">GhcTc</span></a></span><span>
</span><span id="line-117"></span><span>                         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#TcM"><span class="hs-identifier hs-type">TcM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Expr.html#LHsExpr"><span class="hs-identifier hs-type">LHsExpr</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcTc"><span class="hs-identifier hs-type">GhcTc</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-118"></span><span>    </span><span class="hs-comment">-- ^ Modify the TH splice or quasiqoute before it is run.</span><span>
</span><span id="line-119"></span><span>  </span><span class="hs-special">,</span><span> </span><span id="interfaceLoadAction"><span class="annot"><span class="annottext">Plugin -&gt; forall lcl. [String] -&gt; ModIface -&gt; IfM lcl ModIface
</span><a href="GHC.Driver.Plugins.html#interfaceLoadAction"><span class="hs-identifier hs-var hs-var">interfaceLoadAction</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-keyword">forall</span><span> </span><span id="local-6989586621680931473"><span class="annot"><a href="#local-6989586621680931473"><span class="hs-identifier hs-type">lcl</span></a></span></span><span> </span><span class="hs-operator">.</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Driver.Plugins.html#CommandLineOption"><span class="hs-identifier hs-type">CommandLineOption</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#ModIface"><span class="hs-identifier hs-type">ModIface</span></a></span><span>
</span><span id="line-120"></span><span>                                          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#IfM"><span class="hs-identifier hs-type">IfM</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680931473"><span class="hs-identifier hs-type">lcl</span></a></span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#ModIface"><span class="hs-identifier hs-type">ModIface</span></a></span><span>
</span><span id="line-121"></span><span>    </span><span class="hs-comment">-- ^ Modify an interface that have been loaded. This is called by</span><span>
</span><span id="line-122"></span><span>    </span><span class="hs-comment">-- &quot;GHC.Iface.Load&quot; when an interface is successfully loaded. Not applied to</span><span>
</span><span id="line-123"></span><span>    </span><span class="hs-comment">-- the loading of the plugin interface. Tools that rely on information from</span><span>
</span><span id="line-124"></span><span>    </span><span class="hs-comment">-- modules other than the currently compiled one should implement this</span><span>
</span><span id="line-125"></span><span>    </span><span class="hs-comment">-- function.</span><span>
</span><span id="line-126"></span><span>  </span><span class="hs-special">}</span><span>
</span><span id="line-127"></span><span>
</span><span id="line-128"></span><span class="hs-comment">-- Note [Source plugins]</span><span>
</span><span id="line-129"></span><span class="hs-comment">-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</span><span>
</span><span id="line-130"></span><span class="hs-comment">-- The `Plugin` datatype have been extended by fields that allow access to the</span><span>
</span><span id="line-131"></span><span class="hs-comment">-- different inner representations that are generated during the compilation</span><span>
</span><span id="line-132"></span><span class="hs-comment">-- process. These fields are `parsedResultAction`, `renamedResultAction`,</span><span>
</span><span id="line-133"></span><span class="hs-comment">-- `typeCheckResultAction`, `spliceRunAction` and `interfaceLoadAction`.</span><span>
</span><span id="line-134"></span><span class="hs-comment">--</span><span>
</span><span id="line-135"></span><span class="hs-comment">-- The main purpose of these plugins is to help tool developers. They allow</span><span>
</span><span id="line-136"></span><span class="hs-comment">-- development tools to extract the information about the source code of a big</span><span>
</span><span id="line-137"></span><span class="hs-comment">-- Haskell project during the normal build procedure. In this case the plugin</span><span>
</span><span id="line-138"></span><span class="hs-comment">-- acts as the tools access point to the compiler that can be controlled by</span><span>
</span><span id="line-139"></span><span class="hs-comment">-- compiler flags. This is important because the manipulation of compiler flags</span><span>
</span><span id="line-140"></span><span class="hs-comment">-- is supported by most build environment.</span><span>
</span><span id="line-141"></span><span class="hs-comment">--</span><span>
</span><span id="line-142"></span><span class="hs-comment">-- For the full discussion, check the full proposal at:</span><span>
</span><span id="line-143"></span><span class="hs-comment">-- https://gitlab.haskell.org/ghc/ghc/wikis/extended-plugins-proposal</span><span>
</span><span id="line-144"></span><span>
</span><span id="line-145"></span><span class="hs-keyword">data</span><span> </span><span id="PluginWithArgs"><span class="annot"><a href="GHC.Driver.Plugins.html#PluginWithArgs"><span class="hs-identifier hs-var">PluginWithArgs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="PluginWithArgs"><span class="annot"><a href="GHC.Driver.Plugins.html#PluginWithArgs"><span class="hs-identifier hs-var">PluginWithArgs</span></a></span></span><span>
</span><span id="line-146"></span><span>  </span><span class="hs-special">{</span><span> </span><span id="paPlugin"><span class="annot"><span class="annottext">PluginWithArgs -&gt; Plugin
</span><a href="GHC.Driver.Plugins.html#paPlugin"><span class="hs-identifier hs-var hs-var">paPlugin</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Plugins.html#Plugin"><span class="hs-identifier hs-type">Plugin</span></a></span><span>
</span><span id="line-147"></span><span>    </span><span class="hs-comment">-- ^ the actual callable plugin</span><span>
</span><span id="line-148"></span><span>  </span><span class="hs-special">,</span><span> </span><span id="paArguments"><span class="annot"><span class="annottext">PluginWithArgs -&gt; [String]
</span><a href="GHC.Driver.Plugins.html#paArguments"><span class="hs-identifier hs-var hs-var">paArguments</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Driver.Plugins.html#CommandLineOption"><span class="hs-identifier hs-type">CommandLineOption</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-149"></span><span>    </span><span class="hs-comment">-- ^ command line arguments for the plugin</span><span>
</span><span id="line-150"></span><span>  </span><span class="hs-special">}</span><span>
</span><span id="line-151"></span><span>
</span><span id="line-152"></span><span class="hs-comment">-- | A plugin with its arguments. The result of loading the plugin.</span><span>
</span><span id="line-153"></span><span class="hs-keyword">data</span><span> </span><span id="LoadedPlugin"><span class="annot"><a href="GHC.Driver.Plugins.html#LoadedPlugin"><span class="hs-identifier hs-var">LoadedPlugin</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="LoadedPlugin"><span class="annot"><a href="GHC.Driver.Plugins.html#LoadedPlugin"><span class="hs-identifier hs-var">LoadedPlugin</span></a></span></span><span>
</span><span id="line-154"></span><span>  </span><span class="hs-special">{</span><span> </span><span id="lpPlugin"><span class="annot"><span class="annottext">LoadedPlugin -&gt; PluginWithArgs
</span><a href="GHC.Driver.Plugins.html#lpPlugin"><span class="hs-identifier hs-var hs-var">lpPlugin</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Plugins.html#PluginWithArgs"><span class="hs-identifier hs-type">PluginWithArgs</span></a></span><span>
</span><span id="line-155"></span><span>  </span><span class="hs-comment">-- ^ the actual plugin together with its commandline arguments</span><span>
</span><span id="line-156"></span><span>  </span><span class="hs-special">,</span><span> </span><span id="lpModule"><span class="annot"><span class="annottext">LoadedPlugin -&gt; ModIface
</span><a href="GHC.Driver.Plugins.html#lpModule"><span class="hs-identifier hs-var hs-var">lpModule</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#ModIface"><span class="hs-identifier hs-type">ModIface</span></a></span><span>
</span><span id="line-157"></span><span>  </span><span class="hs-comment">-- ^ the module containing the plugin</span><span>
</span><span id="line-158"></span><span>  </span><span class="hs-special">}</span><span>
</span><span id="line-159"></span><span>
</span><span id="line-160"></span><span class="hs-comment">-- | A static plugin with its arguments. For registering compiled-in plugins</span><span>
</span><span id="line-161"></span><span class="hs-comment">-- through the GHC API.</span><span>
</span><span id="line-162"></span><span class="hs-keyword">data</span><span> </span><span id="StaticPlugin"><span class="annot"><a href="GHC.Driver.Plugins.html#StaticPlugin"><span class="hs-identifier hs-var">StaticPlugin</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="StaticPlugin"><span class="annot"><a href="GHC.Driver.Plugins.html#StaticPlugin"><span class="hs-identifier hs-var">StaticPlugin</span></a></span></span><span>
</span><span id="line-163"></span><span>  </span><span class="hs-special">{</span><span> </span><span id="spPlugin"><span class="annot"><span class="annottext">StaticPlugin -&gt; PluginWithArgs
</span><a href="GHC.Driver.Plugins.html#spPlugin"><span class="hs-identifier hs-var hs-var">spPlugin</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Plugins.html#PluginWithArgs"><span class="hs-identifier hs-type">PluginWithArgs</span></a></span><span>
</span><span id="line-164"></span><span>  </span><span class="hs-comment">-- ^ the actual plugin together with its commandline arguments</span><span>
</span><span id="line-165"></span><span>  </span><span class="hs-special">}</span><span>
</span><span id="line-166"></span><span>
</span><span id="line-167"></span><span class="annot"><a href="GHC.Driver.Plugins.html#lpModuleName"><span class="hs-identifier hs-type">lpModuleName</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Plugins.html#LoadedPlugin"><span class="hs-identifier hs-type">LoadedPlugin</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Unit.Module.Name.html#ModuleName"><span class="hs-identifier hs-type">ModuleName</span></a></span><span>
</span><span id="line-168"></span><span id="lpModuleName"><span class="annot"><span class="annottext">lpModuleName :: LoadedPlugin -&gt; ModuleName
</span><a href="GHC.Driver.Plugins.html#lpModuleName"><span class="hs-identifier hs-var hs-var">lpModuleName</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">GenModule Unit -&gt; ModuleName
forall unit. GenModule unit -&gt; ModuleName
</span><a href="GHC.Unit.Types.html#moduleName"><span class="hs-identifier hs-var hs-var">moduleName</span></a></span><span> </span><span class="annot"><span class="annottext">(GenModule Unit -&gt; ModuleName)
-&gt; (LoadedPlugin -&gt; GenModule Unit) -&gt; LoadedPlugin -&gt; ModuleName
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">ModIface -&gt; GenModule Unit
forall (phase :: ModIfacePhase). ModIface_ phase -&gt; GenModule Unit
</span><a href="GHC.Driver.Types.html#mi_module"><span class="hs-identifier hs-var hs-var">mi_module</span></a></span><span> </span><span class="annot"><span class="annottext">(ModIface -&gt; GenModule Unit)
-&gt; (LoadedPlugin -&gt; ModIface) -&gt; LoadedPlugin -&gt; GenModule Unit
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">LoadedPlugin -&gt; ModIface
</span><a href="GHC.Driver.Plugins.html#lpModule"><span class="hs-identifier hs-var hs-var">lpModule</span></a></span><span>
</span><span id="line-169"></span><span>
</span><span id="line-170"></span><span class="annot"><a href="GHC.Driver.Plugins.html#pluginRecompile%27"><span class="hs-identifier hs-type">pluginRecompile'</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Plugins.html#PluginWithArgs"><span class="hs-identifier hs-type">PluginWithArgs</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="GHC.Driver.Plugins.html#PluginRecompile"><span class="hs-identifier hs-type">PluginRecompile</span></a></span><span>
</span><span id="line-171"></span><span id="pluginRecompile%27"><span class="annot"><span class="annottext">pluginRecompile' :: PluginWithArgs -&gt; IO PluginRecompile
</span><a href="GHC.Driver.Plugins.html#pluginRecompile%27"><span class="hs-identifier hs-var hs-var">pluginRecompile'</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Driver.Plugins.html#PluginWithArgs"><span class="hs-identifier hs-type">PluginWithArgs</span></a></span><span> </span><span id="local-6989586621680931336"><span class="annot"><span class="annottext">Plugin
</span><a href="#local-6989586621680931336"><span class="hs-identifier hs-var">plugin</span></a></span></span><span> </span><span id="local-6989586621680931335"><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621680931335"><span class="hs-identifier hs-var">args</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Plugin -&gt; [String] -&gt; IO PluginRecompile
</span><a href="GHC.Driver.Plugins.html#pluginRecompile"><span class="hs-identifier hs-var hs-var">pluginRecompile</span></a></span><span> </span><span class="annot"><span class="annottext">Plugin
</span><a href="#local-6989586621680931336"><span class="hs-identifier hs-var">plugin</span></a></span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621680931335"><span class="hs-identifier hs-var">args</span></a></span><span>
</span><span id="line-172"></span><span>
</span><span id="line-173"></span><span class="hs-keyword">data</span><span> </span><span id="PluginRecompile"><span class="annot"><a href="GHC.Driver.Plugins.html#PluginRecompile"><span class="hs-identifier hs-var">PluginRecompile</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="ForceRecompile"><span class="annot"><a href="GHC.Driver.Plugins.html#ForceRecompile"><span class="hs-identifier hs-var">ForceRecompile</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span id="NoForceRecompile"><span class="annot"><a href="GHC.Driver.Plugins.html#NoForceRecompile"><span class="hs-identifier hs-var">NoForceRecompile</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span id="MaybeRecompile"><span class="annot"><a href="GHC.Driver.Plugins.html#MaybeRecompile"><span class="hs-identifier hs-var">MaybeRecompile</span></a></span></span><span> </span><span class="annot"><a href="../../base/src/GHC.Fingerprint.Type.html#Fingerprint"><span class="hs-identifier hs-type">Fingerprint</span></a></span><span>
</span><span id="line-174"></span><span>
</span><span id="line-175"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621680931329"><span class="annot"><a href="GHC.Utils.Outputable.html#Outputable"><span class="hs-identifier hs-type">Outputable</span></a></span><span> </span><span class="annot"><a href="GHC.Driver.Plugins.html#PluginRecompile"><span class="hs-identifier hs-type">PluginRecompile</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-176"></span><span>  </span><span id="local-6989586621680931325"><span class="annot"><span class="annottext">ppr :: PluginRecompile -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var hs-var hs-var hs-var">ppr</span></a></span></span><span> </span><span class="annot"><span class="annottext">PluginRecompile
</span><a href="GHC.Driver.Plugins.html#ForceRecompile"><span class="hs-identifier hs-var">ForceRecompile</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;ForceRecompile&quot;</span></span><span>
</span><span id="line-177"></span><span>  </span><span class="annot"><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">PluginRecompile
</span><a href="GHC.Driver.Plugins.html#NoForceRecompile"><span class="hs-identifier hs-var">NoForceRecompile</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;NoForceRecompile&quot;</span></span><span>
</span><span id="line-178"></span><span>  </span><span class="annot"><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Driver.Plugins.html#MaybeRecompile"><span class="hs-identifier hs-type">MaybeRecompile</span></a></span><span> </span><span id="local-6989586621680931323"><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621680931323"><span class="hs-identifier hs-var">fp</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;MaybeRecompile&quot;</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Fingerprint -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621680931323"><span class="hs-identifier hs-var">fp</span></a></span><span>
</span><span id="line-179"></span><span>
</span><span id="line-180"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621680931318"><span id="local-6989586621680931320"><span class="annot"><a href="../../base/src/GHC.Base.html#Semigroup"><span class="hs-identifier hs-type">Semigroup</span></a></span><span> </span><span class="annot"><a href="GHC.Driver.Plugins.html#PluginRecompile"><span class="hs-identifier hs-type">PluginRecompile</span></a></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-181"></span><span>  </span><span class="annot"><span class="annottext">PluginRecompile
</span><a href="GHC.Driver.Plugins.html#ForceRecompile"><span class="hs-identifier hs-var">ForceRecompile</span></a></span><span> </span><span id="local-6989586621680931316"><span class="annot"><span class="annottext">&lt;&gt; :: PluginRecompile -&gt; PluginRecompile -&gt; PluginRecompile
</span><a href="../../base/src/GHC.Base.html#%3C%3E"><span class="hs-operator hs-var hs-var hs-var hs-var">&lt;&gt;</span></a></span></span><span> </span><span class="annot"><span class="annottext">PluginRecompile
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PluginRecompile
</span><a href="GHC.Driver.Plugins.html#ForceRecompile"><span class="hs-identifier hs-var">ForceRecompile</span></a></span><span>
</span><span id="line-182"></span><span>  </span><span class="annot"><span class="annottext">PluginRecompile
</span><a href="GHC.Driver.Plugins.html#NoForceRecompile"><span class="hs-identifier hs-var">NoForceRecompile</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span id="local-6989586621680931315"><span class="annot"><span class="annottext">PluginRecompile
</span><a href="#local-6989586621680931315"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PluginRecompile
</span><a href="#local-6989586621680931315"><span class="hs-identifier hs-var">r</span></a></span><span>
</span><span id="line-183"></span><span>  </span><span class="annot"><a href="GHC.Driver.Plugins.html#MaybeRecompile"><span class="hs-identifier hs-type">MaybeRecompile</span></a></span><span> </span><span id="local-6989586621680931314"><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621680931314"><span class="hs-identifier hs-var">fp</span></a></span></span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">PluginRecompile
</span><a href="GHC.Driver.Plugins.html#NoForceRecompile"><span class="hs-identifier hs-var">NoForceRecompile</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Fingerprint -&gt; PluginRecompile
</span><a href="GHC.Driver.Plugins.html#MaybeRecompile"><span class="hs-identifier hs-var">MaybeRecompile</span></a></span><span> </span><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621680931314"><span class="hs-identifier hs-var">fp</span></a></span><span>
</span><span id="line-184"></span><span>  </span><span class="annot"><a href="GHC.Driver.Plugins.html#MaybeRecompile"><span class="hs-identifier hs-type">MaybeRecompile</span></a></span><span> </span><span id="local-6989586621680931313"><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621680931313"><span class="hs-identifier hs-var">fp</span></a></span></span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><a href="GHC.Driver.Plugins.html#MaybeRecompile"><span class="hs-identifier hs-type">MaybeRecompile</span></a></span><span> </span><span id="local-6989586621680931312"><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621680931312"><span class="hs-identifier hs-var">fp'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Fingerprint -&gt; PluginRecompile
</span><a href="GHC.Driver.Plugins.html#MaybeRecompile"><span class="hs-identifier hs-var">MaybeRecompile</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Fingerprint] -&gt; Fingerprint
</span><a href="../../base/src/GHC.Fingerprint.html#fingerprintFingerprints"><span class="hs-identifier hs-var">fingerprintFingerprints</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621680931313"><span class="hs-identifier hs-var">fp</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621680931312"><span class="hs-identifier hs-var">fp'</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-185"></span><span>  </span><span class="annot"><a href="GHC.Driver.Plugins.html#MaybeRecompile"><span class="hs-identifier hs-type">MaybeRecompile</span></a></span><span> </span><span id="local-6989586621680931310"><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621680931310"><span class="hs-identifier hs-var">_fp</span></a></span></span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">PluginRecompile
</span><a href="GHC.Driver.Plugins.html#ForceRecompile"><span class="hs-identifier hs-var">ForceRecompile</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PluginRecompile
</span><a href="GHC.Driver.Plugins.html#ForceRecompile"><span class="hs-identifier hs-var">ForceRecompile</span></a></span><span>
</span><span id="line-186"></span><span>
</span><span id="line-187"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621680931303"><span id="local-6989586621680931305"><span class="annot"><a href="../../base/src/GHC.Base.html#Monoid"><span class="hs-identifier hs-type">Monoid</span></a></span><span> </span><span class="annot"><a href="GHC.Driver.Plugins.html#PluginRecompile"><span class="hs-identifier hs-type">PluginRecompile</span></a></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-188"></span><span>  </span><span id="local-6989586621680931301"><span class="annot"><span class="annottext">mempty :: PluginRecompile
</span><a href="../../base/src/GHC.Base.html#mempty"><span class="hs-identifier hs-var hs-var hs-var hs-var">mempty</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PluginRecompile
</span><a href="GHC.Driver.Plugins.html#NoForceRecompile"><span class="hs-identifier hs-var">NoForceRecompile</span></a></span><span>
</span><span id="line-189"></span><span>
</span><span id="line-190"></span><span class="hs-keyword">type</span><span> </span><span id="CorePlugin"><span class="annot"><a href="GHC.Driver.Plugins.html#CorePlugin"><span class="hs-identifier hs-var">CorePlugin</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Driver.Plugins.html#CommandLineOption"><span class="hs-identifier hs-type">CommandLineOption</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Core.Opt.Monad.html#CoreToDo"><span class="hs-identifier hs-type">CoreToDo</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#CoreM"><span class="hs-identifier hs-type">CoreM</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Core.Opt.Monad.html#CoreToDo"><span class="hs-identifier hs-type">CoreToDo</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-191"></span><span class="hs-keyword">type</span><span> </span><span id="TcPlugin"><span class="annot"><a href="GHC.Driver.Plugins.html#TcPlugin"><span class="hs-identifier hs-var">TcPlugin</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Driver.Plugins.html#CommandLineOption"><span class="hs-identifier hs-type">CommandLineOption</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#TcPlugin"><span class="hs-identifier hs-type">GHC.Tc.Types.TcPlugin</span></a></span><span>
</span><span id="line-192"></span><span class="hs-keyword">type</span><span> </span><span id="HoleFitPlugin"><span class="annot"><a href="GHC.Driver.Plugins.html#HoleFitPlugin"><span class="hs-identifier hs-var">HoleFitPlugin</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Driver.Plugins.html#CommandLineOption"><span class="hs-identifier hs-type">CommandLineOption</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.Tc.Errors.Hole.FitTypes.html#HoleFitPluginR"><span class="hs-identifier hs-type">HoleFitPluginR</span></a></span><span>
</span><span id="line-193"></span><span>
</span><span id="line-194"></span><span class="annot"><a href="GHC.Driver.Plugins.html#purePlugin"><span class="hs-identifier hs-type">purePlugin</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Driver.Plugins.html#impurePlugin"><span class="hs-identifier hs-type">impurePlugin</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Driver.Plugins.html#flagRecompile"><span class="hs-identifier hs-type">flagRecompile</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Driver.Plugins.html#CommandLineOption"><span class="hs-identifier hs-type">CommandLineOption</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="GHC.Driver.Plugins.html#PluginRecompile"><span class="hs-identifier hs-type">PluginRecompile</span></a></span><span>
</span><span id="line-195"></span><span id="purePlugin"><span class="annot"><span class="annottext">purePlugin :: [String] -&gt; IO PluginRecompile
</span><a href="GHC.Driver.Plugins.html#purePlugin"><span class="hs-identifier hs-var hs-var">purePlugin</span></a></span></span><span> </span><span id="local-6989586621680931300"><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621680931300"><span class="hs-identifier hs-var">_args</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PluginRecompile -&gt; IO PluginRecompile
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">PluginRecompile
</span><a href="GHC.Driver.Plugins.html#NoForceRecompile"><span class="hs-identifier hs-var">NoForceRecompile</span></a></span><span>
</span><span id="line-196"></span><span>
</span><span id="line-197"></span><span id="impurePlugin"><span class="annot"><span class="annottext">impurePlugin :: [String] -&gt; IO PluginRecompile
</span><a href="GHC.Driver.Plugins.html#impurePlugin"><span class="hs-identifier hs-var hs-var">impurePlugin</span></a></span></span><span> </span><span id="local-6989586621680931299"><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621680931299"><span class="hs-identifier hs-var">_args</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PluginRecompile -&gt; IO PluginRecompile
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">PluginRecompile
</span><a href="GHC.Driver.Plugins.html#ForceRecompile"><span class="hs-identifier hs-var">ForceRecompile</span></a></span><span>
</span><span id="line-198"></span><span>
</span><span id="line-199"></span><span id="flagRecompile"><span class="annot"><span class="annottext">flagRecompile :: [String] -&gt; IO PluginRecompile
</span><a href="GHC.Driver.Plugins.html#flagRecompile"><span class="hs-identifier hs-var hs-var">flagRecompile</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-200"></span><span>  </span><span class="annot"><span class="annottext">PluginRecompile -&gt; IO PluginRecompile
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">(PluginRecompile -&gt; IO PluginRecompile)
-&gt; ([String] -&gt; PluginRecompile) -&gt; [String] -&gt; IO PluginRecompile
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Fingerprint -&gt; PluginRecompile
</span><a href="GHC.Driver.Plugins.html#MaybeRecompile"><span class="hs-identifier hs-var">MaybeRecompile</span></a></span><span> </span><span class="annot"><span class="annottext">(Fingerprint -&gt; PluginRecompile)
-&gt; ([String] -&gt; Fingerprint) -&gt; [String] -&gt; PluginRecompile
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">[Fingerprint] -&gt; Fingerprint
</span><a href="../../base/src/GHC.Fingerprint.html#fingerprintFingerprints"><span class="hs-identifier hs-var">fingerprintFingerprints</span></a></span><span> </span><span class="annot"><span class="annottext">([Fingerprint] -&gt; Fingerprint)
-&gt; ([String] -&gt; [Fingerprint]) -&gt; [String] -&gt; Fingerprint
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; Fingerprint) -&gt; [String] -&gt; [Fingerprint]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; Fingerprint
</span><a href="../../base/src/GHC.Fingerprint.html#fingerprintString"><span class="hs-identifier hs-var">fingerprintString</span></a></span><span> </span><span class="annot"><span class="annottext">([String] -&gt; [Fingerprint])
-&gt; ([String] -&gt; [String]) -&gt; [String] -&gt; [Fingerprint]
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">[String] -&gt; [String]
forall a. Ord a =&gt; [a] -&gt; [a]
</span><a href="../../base/src/Data.OldList.html#sort"><span class="hs-identifier hs-var">sort</span></a></span><span>
</span><span id="line-201"></span><span>
</span><span id="line-202"></span><span class="hs-comment">-- | Default plugin: does nothing at all, except for marking that safe</span><span>
</span><span id="line-203"></span><span class="hs-comment">-- inference has failed unless @-fplugin-trustworthy@ is passed. For</span><span>
</span><span id="line-204"></span><span class="hs-comment">-- compatibility reason you should base all your plugin definitions on this</span><span>
</span><span id="line-205"></span><span class="hs-comment">-- default value.</span><span>
</span><span id="line-206"></span><span class="annot"><a href="GHC.Driver.Plugins.html#defaultPlugin"><span class="hs-identifier hs-type">defaultPlugin</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Plugins.html#Plugin"><span class="hs-identifier hs-type">Plugin</span></a></span><span>
</span><span id="line-207"></span><span id="defaultPlugin"><span class="annot"><span class="annottext">defaultPlugin :: Plugin
</span><a href="GHC.Driver.Plugins.html#defaultPlugin"><span class="hs-identifier hs-var hs-var">defaultPlugin</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Plugin :: CorePlugin
-&gt; TcPlugin
-&gt; HoleFitPlugin
-&gt; ([String] -&gt; DynFlags -&gt; IO DynFlags)
-&gt; ([String] -&gt; IO PluginRecompile)
-&gt; ([String] -&gt; ModSummary -&gt; HsParsedModule -&gt; Hsc HsParsedModule)
-&gt; ([String]
    -&gt; TcGblEnv -&gt; HsGroup GhcRn -&gt; TcM (TcGblEnv, HsGroup GhcRn))
-&gt; ([String] -&gt; ModSummary -&gt; TcGblEnv -&gt; TcM TcGblEnv)
-&gt; ([String] -&gt; LHsExpr GhcTc -&gt; TcM (LHsExpr GhcTc))
-&gt; (forall lcl. [String] -&gt; ModIface -&gt; IfM lcl ModIface)
-&gt; Plugin
</span><a href="GHC.Driver.Plugins.html#Plugin"><span class="hs-identifier hs-type">Plugin</span></a></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-208"></span><span>        </span><span class="annot"><span class="annottext">installCoreToDos :: CorePlugin
</span><a href="GHC.Driver.Plugins.html#installCoreToDos"><span class="hs-identifier hs-var">installCoreToDos</span></a></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">([CoreToDo] -&gt; CoreM [CoreToDo]) -&gt; CorePlugin
forall a b. a -&gt; b -&gt; a
</span><a href="../../base/src/GHC.Base.html#const"><span class="hs-identifier hs-var">const</span></a></span><span> </span><span class="annot"><span class="annottext">[CoreToDo] -&gt; CoreM [CoreToDo]
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span>
</span><span id="line-209"></span><span>      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">tcPlugin :: TcPlugin
</span><a href="GHC.Driver.Plugins.html#tcPlugin"><span class="hs-identifier hs-var">tcPlugin</span></a></span><span>              </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe TcPlugin -&gt; TcPlugin
forall a b. a -&gt; b -&gt; a
</span><a href="../../base/src/GHC.Base.html#const"><span class="hs-identifier hs-var">const</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe TcPlugin
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-210"></span><span>      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">holeFitPlugin :: HoleFitPlugin
</span><a href="GHC.Driver.Plugins.html#holeFitPlugin"><span class="hs-identifier hs-var">holeFitPlugin</span></a></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe HoleFitPluginR -&gt; HoleFitPlugin
forall a b. a -&gt; b -&gt; a
</span><a href="../../base/src/GHC.Base.html#const"><span class="hs-identifier hs-var">const</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe HoleFitPluginR
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-211"></span><span>      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">dynflagsPlugin :: [String] -&gt; DynFlags -&gt; IO DynFlags
</span><a href="GHC.Driver.Plugins.html#dynflagsPlugin"><span class="hs-identifier hs-var">dynflagsPlugin</span></a></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(DynFlags -&gt; IO DynFlags) -&gt; [String] -&gt; DynFlags -&gt; IO DynFlags
forall a b. a -&gt; b -&gt; a
</span><a href="../../base/src/GHC.Base.html#const"><span class="hs-identifier hs-var">const</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; IO DynFlags
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span>
</span><span id="line-212"></span><span>      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">pluginRecompile :: [String] -&gt; IO PluginRecompile
</span><a href="GHC.Driver.Plugins.html#pluginRecompile"><span class="hs-identifier hs-var">pluginRecompile</span></a></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[String] -&gt; IO PluginRecompile
</span><a href="GHC.Driver.Plugins.html#impurePlugin"><span class="hs-identifier hs-var">impurePlugin</span></a></span><span>
</span><span id="line-213"></span><span>      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">renamedResultAction :: [String]
-&gt; TcGblEnv -&gt; HsGroup GhcRn -&gt; TcM (TcGblEnv, HsGroup GhcRn)
</span><a href="GHC.Driver.Plugins.html#renamedResultAction"><span class="hs-identifier hs-var">renamedResultAction</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="hs-glyph">\</span><span class="annot"><span class="annottext">[String]
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680931296"><span class="annot"><span class="annottext">TcGblEnv
</span><a href="#local-6989586621680931296"><span class="hs-identifier hs-var">env</span></a></span></span><span> </span><span id="local-6989586621680931295"><span class="annot"><span class="annottext">HsGroup GhcRn
</span><a href="#local-6989586621680931295"><span class="hs-identifier hs-var">grp</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">(TcGblEnv, HsGroup GhcRn) -&gt; TcM (TcGblEnv, HsGroup GhcRn)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">TcGblEnv
</span><a href="#local-6989586621680931296"><span class="hs-identifier hs-var">env</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">HsGroup GhcRn
</span><a href="#local-6989586621680931295"><span class="hs-identifier hs-var">grp</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-214"></span><span>      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">parsedResultAction :: [String] -&gt; ModSummary -&gt; HsParsedModule -&gt; Hsc HsParsedModule
</span><a href="GHC.Driver.Plugins.html#parsedResultAction"><span class="hs-identifier hs-var">parsedResultAction</span></a></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="hs-glyph">\</span><span class="annot"><span class="annottext">[String]
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">ModSummary
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">HsParsedModule -&gt; Hsc HsParsedModule
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span>
</span><span id="line-215"></span><span>      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">typeCheckResultAction :: [String] -&gt; ModSummary -&gt; TcGblEnv -&gt; TcM TcGblEnv
</span><a href="GHC.Driver.Plugins.html#typeCheckResultAction"><span class="hs-identifier hs-var">typeCheckResultAction</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-glyph">\</span><span class="annot"><span class="annottext">[String]
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">ModSummary
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">TcGblEnv -&gt; TcM TcGblEnv
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span>
</span><span id="line-216"></span><span>      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">spliceRunAction :: [String] -&gt; LHsExpr GhcTc -&gt; TcM (LHsExpr GhcTc)
</span><a href="GHC.Driver.Plugins.html#spliceRunAction"><span class="hs-identifier hs-var">spliceRunAction</span></a></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="hs-glyph">\</span><span class="annot"><span class="annottext">[String]
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc -&gt; TcM (LHsExpr GhcTc)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span>
</span><span id="line-217"></span><span>      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">interfaceLoadAction :: forall lcl. [String] -&gt; ModIface -&gt; IfM lcl ModIface
</span><a href="GHC.Driver.Plugins.html#interfaceLoadAction"><span class="hs-identifier hs-var">interfaceLoadAction</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="hs-glyph">\</span><span class="annot"><span class="annottext">[String]
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">ModIface -&gt; IfM lcl ModIface
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span>
</span><span id="line-218"></span><span>    </span><span class="hs-special">}</span><span>
</span><span id="line-219"></span><span>
</span><span id="line-220"></span><span>
</span><span id="line-221"></span><span class="hs-comment">-- | A renamer plugin which mades the renamed source available in</span><span>
</span><span id="line-222"></span><span class="hs-comment">-- a typechecker plugin.</span><span>
</span><span id="line-223"></span><span class="annot"><a href="GHC.Driver.Plugins.html#keepRenamedSource"><span class="hs-identifier hs-type">keepRenamedSource</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Driver.Plugins.html#CommandLineOption"><span class="hs-identifier hs-type">CommandLineOption</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#TcGblEnv"><span class="hs-identifier hs-type">TcGblEnv</span></a></span><span>
</span><span id="line-224"></span><span>                  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Hs.Decls.html#HsGroup"><span class="hs-identifier hs-type">HsGroup</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#TcM"><span class="hs-identifier hs-type">TcM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Tc.Types.html#TcGblEnv"><span class="hs-identifier hs-type">TcGblEnv</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Hs.Decls.html#HsGroup"><span class="hs-identifier hs-type">HsGroup</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-225"></span><span id="keepRenamedSource"><span class="annot"><span class="annottext">keepRenamedSource :: [String]
-&gt; TcGblEnv -&gt; HsGroup GhcRn -&gt; TcM (TcGblEnv, HsGroup GhcRn)
</span><a href="GHC.Driver.Plugins.html#keepRenamedSource"><span class="hs-identifier hs-var hs-var">keepRenamedSource</span></a></span></span><span> </span><span class="annot"><span class="annottext">[String]
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680931293"><span class="annot"><span class="annottext">TcGblEnv
</span><a href="#local-6989586621680931293"><span class="hs-identifier hs-var">gbl_env</span></a></span></span><span> </span><span id="local-6989586621680931292"><span class="annot"><span class="annottext">HsGroup GhcRn
</span><a href="#local-6989586621680931292"><span class="hs-identifier hs-var">group</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-226"></span><span>  </span><span class="annot"><span class="annottext">(TcGblEnv, HsGroup GhcRn) -&gt; TcM (TcGblEnv, HsGroup GhcRn)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">TcGblEnv
</span><a href="#local-6989586621680931293"><span class="hs-identifier hs-var">gbl_env</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">tcg_rn_decls :: Maybe (HsGroup GhcRn)
</span><a href="GHC.Tc.Types.html#tcg_rn_decls"><span class="hs-identifier hs-var">tcg_rn_decls</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe (HsGroup GhcRn) -&gt; Maybe (HsGroup GhcRn)
forall {p :: Pass}.
Maybe (HsGroup (GhcPass p)) -&gt; Maybe (HsGroup (GhcPass p))
</span><a href="#local-6989586621680931291"><span class="hs-identifier hs-var">update</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">TcGblEnv -&gt; Maybe (HsGroup GhcRn)
</span><a href="GHC.Tc.Types.html#tcg_rn_decls"><span class="hs-identifier hs-var hs-var">tcg_rn_decls</span></a></span><span> </span><span class="annot"><span class="annottext">TcGblEnv
</span><a href="#local-6989586621680931293"><span class="hs-identifier hs-var">gbl_env</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-227"></span><span>                  </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">tcg_rn_exports :: Maybe [(Located (IE GhcRn), Avails)]
</span><a href="GHC.Tc.Types.html#tcg_rn_exports"><span class="hs-identifier hs-var">tcg_rn_exports</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe [(Located (IE GhcRn), Avails)]
-&gt; Maybe [(Located (IE GhcRn), Avails)]
forall {a}. Maybe [a] -&gt; Maybe [a]
</span><a href="#local-6989586621680931290"><span class="hs-identifier hs-var">update_exports</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">TcGblEnv -&gt; Maybe [(Located (IE GhcRn), Avails)]
</span><a href="GHC.Tc.Types.html#tcg_rn_exports"><span class="hs-identifier hs-var hs-var">tcg_rn_exports</span></a></span><span> </span><span class="annot"><span class="annottext">TcGblEnv
</span><a href="#local-6989586621680931293"><span class="hs-identifier hs-var">gbl_env</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">HsGroup GhcRn
</span><a href="#local-6989586621680931292"><span class="hs-identifier hs-var">group</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-228"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-229"></span><span>    </span><span id="local-6989586621680931290"><span class="annot"><span class="annottext">update_exports :: Maybe [a] -&gt; Maybe [a]
</span><a href="#local-6989586621680931290"><span class="hs-identifier hs-var hs-var">update_exports</span></a></span></span><span> </span><span class="annot"><span class="annottext">Maybe [a]
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[a] -&gt; Maybe [a]
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-230"></span><span>    </span><span class="annot"><a href="#local-6989586621680931290"><span class="hs-identifier hs-var">update_exports</span></a></span><span> </span><span id="local-6989586621680931289"><span class="annot"><span class="annottext">Maybe [a]
</span><a href="#local-6989586621680931289"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe [a]
</span><a href="#local-6989586621680931289"><span class="hs-identifier hs-var">m</span></a></span><span>
</span><span id="line-231"></span><span>
</span><span id="line-232"></span><span>    </span><span id="local-6989586621680931291"><span class="annot"><span class="annottext">update :: Maybe (HsGroup (GhcPass p)) -&gt; Maybe (HsGroup (GhcPass p))
</span><a href="#local-6989586621680931291"><span class="hs-identifier hs-var hs-var">update</span></a></span></span><span> </span><span class="annot"><span class="annottext">Maybe (HsGroup (GhcPass p))
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HsGroup (GhcPass p) -&gt; Maybe (HsGroup (GhcPass p))
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">HsGroup (GhcPass p)
forall (p :: Pass). HsGroup (GhcPass p)
</span><a href="GHC.Hs.Decls.html#emptyRnGroup"><span class="hs-identifier hs-var">emptyRnGroup</span></a></span><span>
</span><span id="line-233"></span><span>    </span><span class="annot"><a href="#local-6989586621680931291"><span class="hs-identifier hs-var">update</span></a></span><span> </span><span id="local-6989586621680931287"><span class="annot"><span class="annottext">Maybe (HsGroup (GhcPass p))
</span><a href="#local-6989586621680931287"><span class="hs-identifier hs-var">m</span></a></span></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe (HsGroup (GhcPass p))
</span><a href="#local-6989586621680931287"><span class="hs-identifier hs-var">m</span></a></span><span>
</span><span id="line-234"></span><span>
</span><span id="line-235"></span><span>
</span><span id="line-236"></span><span class="hs-keyword">type</span><span> </span><span id="PluginOperation"><span class="annot"><a href="GHC.Driver.Plugins.html#PluginOperation"><span class="hs-identifier hs-var">PluginOperation</span></a></span></span><span> </span><span id="local-6989586621680931286"><span class="annot"><a href="#local-6989586621680931286"><span class="hs-identifier hs-type">m</span></a></span></span><span> </span><span id="local-6989586621680931285"><span class="annot"><a href="#local-6989586621680931285"><span class="hs-identifier hs-type">a</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Driver.Plugins.html#Plugin"><span class="hs-identifier hs-type">Plugin</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Driver.Plugins.html#CommandLineOption"><span class="hs-identifier hs-type">CommandLineOption</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680931285"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680931286"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680931285"><span class="hs-identifier hs-type">a</span></a></span><span>
</span><span id="line-237"></span><span class="hs-keyword">type</span><span> </span><span id="ConstPluginOperation"><span class="annot"><a href="GHC.Driver.Plugins.html#ConstPluginOperation"><span class="hs-identifier hs-var">ConstPluginOperation</span></a></span></span><span> </span><span id="local-6989586621680931284"><span class="annot"><a href="#local-6989586621680931284"><span class="hs-identifier hs-type">m</span></a></span></span><span> </span><span id="local-6989586621680931283"><span class="annot"><a href="#local-6989586621680931283"><span class="hs-identifier hs-type">a</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Driver.Plugins.html#Plugin"><span class="hs-identifier hs-type">Plugin</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Driver.Plugins.html#CommandLineOption"><span class="hs-identifier hs-type">CommandLineOption</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680931283"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680931284"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-238"></span><span>
</span><span id="line-239"></span><span class="annot"><a href="GHC.Driver.Plugins.html#plugins"><span class="hs-identifier hs-type">plugins</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#DynFlags"><span class="hs-identifier hs-type">DynFlags</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Driver.Plugins.html#PluginWithArgs"><span class="hs-identifier hs-type">PluginWithArgs</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-240"></span><span id="plugins"><span class="annot"><span class="annottext">plugins :: DynFlags -&gt; [PluginWithArgs]
</span><a href="GHC.Driver.Plugins.html#plugins"><span class="hs-identifier hs-var hs-var">plugins</span></a></span></span><span> </span><span id="local-6989586621680931282"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680931282"><span class="hs-identifier hs-var">df</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-241"></span><span>  </span><span class="annot"><span class="annottext">(LoadedPlugin -&gt; PluginWithArgs)
-&gt; [LoadedPlugin] -&gt; [PluginWithArgs]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">LoadedPlugin -&gt; PluginWithArgs
</span><a href="GHC.Driver.Plugins.html#lpPlugin"><span class="hs-identifier hs-var hs-var">lpPlugin</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DynFlags -&gt; [LoadedPlugin]
</span><a href="GHC.Driver.Session.html#cachedPlugins"><span class="hs-identifier hs-var hs-var">cachedPlugins</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680931282"><span class="hs-identifier hs-var">df</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[PluginWithArgs] -&gt; [PluginWithArgs] -&gt; [PluginWithArgs]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span>
</span><span id="line-242"></span><span>  </span><span class="annot"><span class="annottext">(StaticPlugin -&gt; PluginWithArgs)
-&gt; [StaticPlugin] -&gt; [PluginWithArgs]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">StaticPlugin -&gt; PluginWithArgs
</span><a href="GHC.Driver.Plugins.html#spPlugin"><span class="hs-identifier hs-var hs-var">spPlugin</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DynFlags -&gt; [StaticPlugin]
</span><a href="GHC.Driver.Session.html#staticPlugins"><span class="hs-identifier hs-var hs-var">staticPlugins</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680931282"><span class="hs-identifier hs-var">df</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-243"></span><span>
</span><span id="line-244"></span><span class="hs-comment">-- | Perform an operation by using all of the plugins in turn.</span><span>
</span><span id="line-245"></span><span id="local-6989586621680931427"><span id="local-6989586621680931428"><span class="annot"><a href="GHC.Driver.Plugins.html#withPlugins"><span class="hs-identifier hs-type">withPlugins</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#Monad"><span class="hs-identifier hs-type">Monad</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680931428"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#DynFlags"><span class="hs-identifier hs-type">DynFlags</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Driver.Plugins.html#PluginOperation"><span class="hs-identifier hs-type">PluginOperation</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680931428"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680931427"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680931427"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680931428"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680931427"><span class="hs-identifier hs-type">a</span></a></span></span></span><span>
</span><span id="line-246"></span><span id="withPlugins"><span class="annot"><span class="annottext">withPlugins :: forall (m :: * -&gt; *) a.
Monad m =&gt;
DynFlags -&gt; PluginOperation m a -&gt; a -&gt; m a
</span><a href="GHC.Driver.Plugins.html#withPlugins"><span class="hs-identifier hs-var hs-var">withPlugins</span></a></span></span><span> </span><span id="local-6989586621680931275"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680931275"><span class="hs-identifier hs-var">df</span></a></span></span><span> </span><span id="local-6989586621680931274"><span class="annot"><span class="annottext">PluginOperation m a
</span><a href="#local-6989586621680931274"><span class="hs-identifier hs-var">transformation</span></a></span></span><span> </span><span id="local-6989586621680931273"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680931273"><span class="hs-identifier hs-var">input</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(a -&gt; PluginWithArgs -&gt; m a) -&gt; a -&gt; [PluginWithArgs] -&gt; m a
forall (t :: * -&gt; *) (m :: * -&gt; *) b a.
(Foldable t, Monad m) =&gt;
(b -&gt; a -&gt; m b) -&gt; b -&gt; t a -&gt; m b
</span><a href="../../base/src/Control.Monad.html#foldM"><span class="hs-identifier hs-var">foldM</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; PluginWithArgs -&gt; m a
</span><a href="#local-6989586621680931271"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680931273"><span class="hs-identifier hs-var">input</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DynFlags -&gt; [PluginWithArgs]
</span><a href="GHC.Driver.Plugins.html#plugins"><span class="hs-identifier hs-var">plugins</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680931275"><span class="hs-identifier hs-var">df</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-247"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-248"></span><span>    </span><span id="local-6989586621680931271"><span class="annot"><span class="annottext">go :: a -&gt; PluginWithArgs -&gt; m a
</span><a href="#local-6989586621680931271"><span class="hs-identifier hs-var hs-var">go</span></a></span></span><span> </span><span id="local-6989586621680931270"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680931270"><span class="hs-identifier hs-var">arg</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Driver.Plugins.html#PluginWithArgs"><span class="hs-identifier hs-type">PluginWithArgs</span></a></span><span> </span><span id="local-6989586621680931269"><span class="annot"><span class="annottext">Plugin
</span><a href="#local-6989586621680931269"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span id="local-6989586621680931268"><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621680931268"><span class="hs-identifier hs-var">opts</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PluginOperation m a
</span><a href="#local-6989586621680931274"><span class="hs-identifier hs-var">transformation</span></a></span><span> </span><span class="annot"><span class="annottext">Plugin
</span><a href="#local-6989586621680931269"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621680931268"><span class="hs-identifier hs-var">opts</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680931270"><span class="hs-identifier hs-var">arg</span></a></span><span>
</span><span id="line-249"></span><span>
</span><span id="line-250"></span><span id="local-6989586621680931419"><span class="annot"><a href="GHC.Driver.Plugins.html#mapPlugins"><span class="hs-identifier hs-type">mapPlugins</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#DynFlags"><span class="hs-identifier hs-type">DynFlags</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Driver.Plugins.html#Plugin"><span class="hs-identifier hs-type">Plugin</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Driver.Plugins.html#CommandLineOption"><span class="hs-identifier hs-type">CommandLineOption</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680931419"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621680931419"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span></span><span>
</span><span id="line-251"></span><span id="mapPlugins"><span class="annot"><span class="annottext">mapPlugins :: forall a. DynFlags -&gt; (Plugin -&gt; [String] -&gt; a) -&gt; [a]
</span><a href="GHC.Driver.Plugins.html#mapPlugins"><span class="hs-identifier hs-var hs-var">mapPlugins</span></a></span></span><span> </span><span id="local-6989586621680931267"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680931267"><span class="hs-identifier hs-var">df</span></a></span></span><span> </span><span id="local-6989586621680931266"><span class="annot"><span class="annottext">Plugin -&gt; [String] -&gt; a
</span><a href="#local-6989586621680931266"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(PluginWithArgs -&gt; a) -&gt; [PluginWithArgs] -&gt; [a]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Driver.Plugins.html#PluginWithArgs"><span class="hs-identifier hs-type">PluginWithArgs</span></a></span><span> </span><span id="local-6989586621680931265"><span class="annot"><span class="annottext">Plugin
</span><a href="#local-6989586621680931265"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span id="local-6989586621680931264"><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621680931264"><span class="hs-identifier hs-var">opts</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Plugin -&gt; [String] -&gt; a
</span><a href="#local-6989586621680931266"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">Plugin
</span><a href="#local-6989586621680931265"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621680931264"><span class="hs-identifier hs-var">opts</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DynFlags -&gt; [PluginWithArgs]
</span><a href="GHC.Driver.Plugins.html#plugins"><span class="hs-identifier hs-var">plugins</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680931267"><span class="hs-identifier hs-var">df</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-252"></span><span>
</span><span id="line-253"></span><span class="hs-comment">-- | Perform a constant operation by using all of the plugins in turn.</span><span>
</span><span id="line-254"></span><span id="local-6989586621680931416"><span id="local-6989586621680931417"><span class="annot"><a href="GHC.Driver.Plugins.html#withPlugins_"><span class="hs-identifier hs-type">withPlugins_</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#Monad"><span class="hs-identifier hs-type">Monad</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680931417"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#DynFlags"><span class="hs-identifier hs-type">DynFlags</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Driver.Plugins.html#ConstPluginOperation"><span class="hs-identifier hs-type">ConstPluginOperation</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680931417"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680931416"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680931416"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680931417"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span></span></span><span>
</span><span id="line-255"></span><span id="withPlugins_"><span class="annot"><span class="annottext">withPlugins_ :: forall (m :: * -&gt; *) a.
Monad m =&gt;
DynFlags -&gt; ConstPluginOperation m a -&gt; a -&gt; m ()
</span><a href="GHC.Driver.Plugins.html#withPlugins_"><span class="hs-identifier hs-var hs-var">withPlugins_</span></a></span></span><span> </span><span id="local-6989586621680931260"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680931260"><span class="hs-identifier hs-var">df</span></a></span></span><span> </span><span id="local-6989586621680931259"><span class="annot"><span class="annottext">ConstPluginOperation m a
</span><a href="#local-6989586621680931259"><span class="hs-identifier hs-var">transformation</span></a></span></span><span> </span><span id="local-6989586621680931258"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680931258"><span class="hs-identifier hs-var">input</span></a></span></span><span>
</span><span id="line-256"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(PluginWithArgs -&gt; m ()) -&gt; [PluginWithArgs] -&gt; m ()
forall (t :: * -&gt; *) (m :: * -&gt; *) a b.
(Foldable t, Monad m) =&gt;
(a -&gt; m b) -&gt; t a -&gt; m ()
</span><a href="../../base/src/Data.Foldable.html#mapM_"><span class="hs-identifier hs-var">mapM_</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Driver.Plugins.html#PluginWithArgs"><span class="hs-identifier hs-type">PluginWithArgs</span></a></span><span> </span><span id="local-6989586621680931256"><span class="annot"><span class="annottext">Plugin
</span><a href="#local-6989586621680931256"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span id="local-6989586621680931255"><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621680931255"><span class="hs-identifier hs-var">opts</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">ConstPluginOperation m a
</span><a href="#local-6989586621680931259"><span class="hs-identifier hs-var">transformation</span></a></span><span> </span><span class="annot"><span class="annottext">Plugin
</span><a href="#local-6989586621680931256"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621680931255"><span class="hs-identifier hs-var">opts</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680931258"><span class="hs-identifier hs-var">input</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-257"></span><span>          </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DynFlags -&gt; [PluginWithArgs]
</span><a href="GHC.Driver.Plugins.html#plugins"><span class="hs-identifier hs-var">plugins</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680931260"><span class="hs-identifier hs-var">df</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-258"></span><span>
</span><span id="line-259"></span><span class="hs-keyword">type</span><span> </span><span id="FrontendPluginAction"><span class="annot"><a href="GHC.Driver.Plugins.html#FrontendPluginAction"><span class="hs-identifier hs-var">FrontendPluginAction</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.Driver.Phases.html#Phase"><span class="hs-identifier hs-type">Phase</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Driver.Monad.html#Ghc"><span class="hs-identifier hs-type">Ghc</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-260"></span><span class="hs-keyword">data</span><span> </span><span id="FrontendPlugin"><span class="annot"><a href="GHC.Driver.Plugins.html#FrontendPlugin"><span class="hs-identifier hs-var">FrontendPlugin</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="FrontendPlugin"><span class="annot"><a href="GHC.Driver.Plugins.html#FrontendPlugin"><span class="hs-identifier hs-var">FrontendPlugin</span></a></span></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-261"></span><span>      </span><span id="frontend"><span class="annot"><span class="annottext">FrontendPlugin -&gt; FrontendPluginAction
</span><a href="GHC.Driver.Plugins.html#frontend"><span class="hs-identifier hs-var hs-var">frontend</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Plugins.html#FrontendPluginAction"><span class="hs-identifier hs-type">FrontendPluginAction</span></a></span><span>
</span><span id="line-262"></span><span>    </span><span class="hs-special">}</span><span>
</span><span id="line-263"></span><span class="annot"><a href="GHC.Driver.Plugins.html#defaultFrontendPlugin"><span class="hs-identifier hs-type">defaultFrontendPlugin</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Plugins.html#FrontendPlugin"><span class="hs-identifier hs-type">FrontendPlugin</span></a></span><span>
</span><span id="line-264"></span><span id="defaultFrontendPlugin"><span class="annot"><span class="annottext">defaultFrontendPlugin :: FrontendPlugin
</span><a href="GHC.Driver.Plugins.html#defaultFrontendPlugin"><span class="hs-identifier hs-var hs-var">defaultFrontendPlugin</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FrontendPlugin :: FrontendPluginAction -&gt; FrontendPlugin
</span><a href="GHC.Driver.Plugins.html#FrontendPlugin"><span class="hs-identifier hs-type">FrontendPlugin</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">frontend :: FrontendPluginAction
</span><a href="GHC.Driver.Plugins.html#frontend"><span class="hs-identifier hs-var">frontend</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-glyph">\</span><span class="annot"><span class="annottext">[String]
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">[(String, Maybe Phase)]
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">() -&gt; Ghc ()
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-265"></span></pre></body></html>